<?php
class getSearch_model extends Model
{
	function getSearch_model()
	{
		parent::Model();
	}
	
	function search($num="",$offset="")
	{
	    $this->db->select('*,ci_ask_ccat.name as cname');
	    $this->db->join('ci_ask_ccat','ci_ask_ccat.id = ci_ask_question.cid');
        $this->db->like('title', $_SESSION['title']);
        $this->db->order_by('ci_ask_question.id desc'); 
        $query = $this->db->get('ci_ask_question',$num,$offset);
        return $query;
	}
	
}
?>